<template>
	<view class="content">
		<topTitle :name="`我的`" right/>
		<view class="flex f-e j-c-c bg">
			<image :src="user.avatar || `../../static/logo.png`" class="avatar" lazy-load/>
			<view class="f24">{{user.nickname}}</view>
			<view class="f14 mt8">{{user.platform}}</view>
		</view>
		<view class="list">
			<view v-for="(item,index) in list" :key="index" class="flex f-a-c j-s-b item" @click="go(item.url)">
				<image :src="item.icon" class="icon"/>
				<view class="flex f-a-c j-s-b f16 right m-lf11">
					<text>{{item.name}}</text>
					<i class="iconfont icon-right f14" />
				</view>
			</view>
		</view>
		<tabbar :active="1"/>
	</view>
</template>

<script>
import tabbar from '@/components/tabbar.vue'
export default {
	components:{ tabbar },
  data() {
    return {
      user: uni.getStorageSync('userInfo'),
      list:[{
        name:'收款银行账户消息',
        icon: '../../static/img/msg.png',
				url:'/pages/my/msg'
      },
      {
        name:'钱包',
        icon: '../../static/img/car.png',
				url:'/pages/my/wallet'
      }]
    }
  },
  onShow() {
		
  },
  methods: {
		go(url){
			this.util.go(url)
		}
  }
}
</script>

<style lang="scss">
	.bg{
		background-image: url('../../static/img/bg.png');
		background-position: center;
		background-repeat: repeat;
		background-size: cover;
		width: 100%;
		height: 580rpx;
		text-align: center;
		margin-top: 24rpx;
		.avatar{
			width: 140rpx;
			height: 140rpx;
			border-radius: 50%;
			margin: 0 auto 40rpx;
		}
	}
	.list{
		padding: 0 32rpx;
		.item{
			.right{
				border-bottom: 2rpx solid #eee;
				padding: 40rpx 0;
				width: 100%;
			}
			.icon{
				width: 52rpx;
				height: 52rpx;
			}
		}
	}
</style>
